package file_io;

import java.io.*;

public class CharFile {
    public static void main(String[] args) throws IOException {
    /*   Reader fr = new FileReader("src/test.txt");
        int read = fr.read();
        System.out.println((char)read);
        int read;
        while ((read=fr.read())!=-1){
            System.out.print((char) read);
        }
        fr.close();
        char[]buffer=new char[1024];
        int read = fr.read(buffer,0,152);
        System.out.println("大小:"+read);
        System.out.println(buffer);
        fr.close();*/
        FileWriter fw = new FileWriter("src/test.txt");
        fw.write("ailibaba");
        fw.close();
    }
}
